<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    // let i = 1;
    // let num1 = prompt("请输入打印次数");

    // while (i <= num1) {
    //     document.write("月薪过十万<br>");
    //     i++;
    // }

    let i = 1;
    while (i <= 100) {
        document.write(i + " <br>");
        i++;
    }

    let num1 = 0;
    let i2 = 1;
    while (i2 <= 100) {
        num1 += i2;
        i2++;
    }
    document.write(num1 + "<br>");

    let num2 = 0;
    let i3 = 1;
    while (i3 <= 100) {
        if (i3 % 2 == 0){
            num2 += i3;
        }
        i3++;
    }
    document.write(num2);
</script>